package com.example.myblogserver.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

@Data
@ApiModel(description = "评论时传递的数据模型")
public class CommentDTO {

    @ApiModelProperty("文章Id")
    private Long articleId;
    @ApiModelProperty("父级评论Id")
    private Long parentId;
    @ApiModelProperty("评论者名称")
    private String authorName;
    @ApiModelProperty("评论者邮箱")
    private String authorEmail;
    @ApiModelProperty("创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createdAt;
    @ApiModelProperty("评论内容")
    private String contentHtml;
    @ApiModelProperty("验证码")
    private String code;
}
